/**
 * Created by Roman on 2016/5/12.
 */
public class WordMaker {
    public static String getAnswer(int num) {
        NormalHandler normalHandler = new NormalHandler();
        FizzBuzzHandler fizzBuzzHandler = new FizzBuzzHandler();
        FizzHandler fizzHandler = new FizzHandler();
        BuzzHandler buzzHandler = new BuzzHandler();
        WhizzHandler whizzHandler = new WhizzHandler();
        FizzBuzzWhizzHandler fizzBuzzWhizzHandler = new FizzBuzzWhizzHandler();

        fizzBuzzWhizzHandler.setNext(fizzBuzzHandler);
        fizzBuzzHandler.setNext(fizzHandler);
        fizzHandler.setNext(buzzHandler);
        buzzHandler.setNext(whizzHandler);
        whizzHandler.setNext(normalHandler);

        return fizzBuzzWhizzHandler.handle(num);
    }
}
